package tp.pr5.gui;

import javax.swing.JComboBox;

import tp.pr5.Directions;
import tp.pr5.Game;
import tp.pr5.GameController;
import tp.pr5.commands.DropCommand;
import tp.pr5.commands.GoCommand;
import tp.pr5.commands.PickCommand;
import tp.pr5.commands.QuitCommand;
import tp.pr5.commands.UseCommand;

public class GameControllerGUI extends GameController {

	public GameControllerGUI(Game g) {
		super(g);

	}

	/** Executes a DROP command{} */
	public void executeDropAction(java.lang.String item) {
		this.game.executeCommand(new DropCommand(item));
	}

	/** Executes a PICK command{} */
	public void executePickAction(java.lang.String item) {
		this.game.executeCommand(new PickCommand(item));
	}

	/** Executes a QUIT command{} */
	public void executeQuitAction() {
		this.game.executeCommand(new QuitCommand());
	}

	/** Executes an USE command */
	public void executeUseAction(java.lang.String itemName) {

		this.game.executeCommand(new UseCommand(itemName));
	}

	/** This method only requests the game to start */
	public void runGame() {
		this.game.requestStart();

	}

	public void executeGoAction(Directions dir) {
		this.game.executeCommand(new GoCommand(dir));
	}

}
